﻿using System;
using System.Collections.Generic;

namespace Citi.HeadCount.Domain
{
    public class FRSBu : EntityBase
    {
        public virtual string Code { get; set; }
        public virtual string Description { get; set; }
    }

    public class FRSBuComparer : IEqualityComparer<FRSBu>
    {
        public bool Equals(FRSBu x, FRSBu y)
        {
            if (Object.ReferenceEquals(x, y)) return true;
            if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
                return false;

            return x.Description == y.Description && x.Id == y.Id;
        }

        public int GetHashCode(FRSBu item)
        {
            if (Object.ReferenceEquals(item, null)) return 0;

            int hashDescription = item.Description == null ? 0 : item.Description.GetHashCode();
            int hashId = item.Description == null ? 0 : item.Id.GetHashCode();

            return hashDescription ^ hashId;
        }

    }
}
